<?php
namespace Home\Controller;

use Think\Controller;

class ArticleController extends Controller
{

    /**
     * 文章
     */
    public function show()
    {
        $id = I('get.id');
        if (empty($id)) {
            exit('无效的数据');
        }
        $info = M('Article')->where('article_id = ' . $id)->find();
        if ($info){
            M('Article')->where(array( 'article_id' => $id ))->setInc('click', 1);            
        }
        $this->assign('info', $info);
        $this->display();
    }

}